<?php

namespace app\common\model;

use think\Model;

class Qbank extends Model
{
    //
    public function answer()
    {
        return $this->hasMany('Answer', 'qid', 'qid');
    }

    public function bankname()
    {
        return $this->belongsTo('QbankName', 'qbank', 'bid');
    }

    public function type()
    {
        return $this->belongsTo('QbankType','qtype','qtype');
    }
    public function user(){
        return $this->belongsTo('app\admin\model\User','uid','id');
    }
}
